package com.javaee.dao;


import com.javaee.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;


public interface UserDao {

    @Insert("insert into t_sys_user (id, login_name, password, gender, birthday, phone, email, status) VALUES (#{id}, #{login_name}, #{password}, #{gender}, #{birthday}, #{phone}, #{email}, #{status})")
    public int add(User user);

    @Select("select * from t_sys_user where id=#{id}")
        public User getById(Integer id);

    @Select("select * from t_sys_user where login_name=#{name}")
    public User getByName(String name);
}
